Skip to main content

XPath Functions

XPath provides a series of functions that help you perform calculations over collections in an easy and intuitive way.

These functions are available through the Expressions functions. These are NOT all the functions available, just ones that help you navigate and work with XPaths.


Basic Functions

FUNCTIONDESCRIPTIONSYNTAX
AndCompares two Booleans that can be XPath or the result of another XPath function. It returns true if they are both true. Otherwise, it returns false.<and(XPath,XPath)>
AvgObtains the average of elements in a collection. The attribute to average must be a number or currency.<avg(XPath)>
CountCounts the number of elements in a collection.<count(XPath)>
EmptyReturns True when a collection is EMPTY and False otherwise.<empty(XPath)>
EqualsCompares two XPath arguments and returns true if they are equivalent. The parameters can be either XPath expressions or XPath functions.<equals(XPath,XPath)>
ExistReturns True when the collection has at least one element and False otherwise.<exists(XPath)>
Greater thanCompares two XPath arguments and returns true if the first one is greater than the second one. It returns false otherwise.<greater-than(XPath,XPath)>
Greater than or equals toCompares two XPath arguments and returns true if the first one is greater than or equal to the second one. The parameters can be integers, decimals, currency, or dates.<greater-equals-than(XPath,XPath)>
Is EmptyReturns true if a string-type attribute is null or empty. Returns false otherwise.<is-empty(XPath)>
Is FalseEvaluates an XPath expression or the result of an XPath function. It returns true if the parameter is false. Otherwise, it returns false.<is-false(XPath)>
Is not EmptyReturns true if a string-type attribute is filled. Returns false otherwise.<is-not-empty(XPath)>
Is not NullReturns true if any attribute is filled (not null). Returns false otherwise.<is-not-null(XPath)>
Is NullReturns true if any attribute is null (not filled). Returns false otherwise.<is-null(XPath)>
Is TrueEvaluates an XPath expression or the result of an XPath function. It returns true if the parameter is true. Otherwise, it returns false.<is-true(XPath)>
Less thanCompares two XPath arguments and returns true if the first one is less than the second one.<less-than(XPath,XPath)>
Less than or equals toCompares two XPath arguments and returns true if the first one is less than or equal to the second one.<less-equals-than(XPath,XPath)>
LikeCompares two parameters and returns true if the second one is included in the first one. The parameters can be string XPath or strings. When using fixed strings, define them between single quotes ('). When any of the parameters is empty, the function will return True.<like(XPath,XPath)>
MaxObtains the maximum value within the elements of a collection. The attribute must be a number or currency.<max(XPath)>
MinObtains the minimum value within the elements of a collection. The attribute must be a number or currency.<min(XPath)>
Not equalsCompares two XPath arguments and returns true if they are NOT equivalent. The parameters can be either XPath expressions or XPath functions.<not-equals(XPath,XPath)>
OrCompares two Booleans that can be XPath expressions or the result of another XPath function. It returns False when both parameters are false. Otherwise, it returns True.<or(XPath,XPath)>
SumAdds the elements of a collection. The attribute to add must be a number or currency.<sum(XPath)>